import { getCurrentInstance } from 'vue'

export default (exposeObj: object) => {
  const instance = getCurrentInstance()
  if (instance) {
    Object.assign(instance.proxy, exposeObj)
  }
}

export const useParent = () => {
  const instance = getCurrentInstance()
  return (instance?.parent as any).proxy
}
